package com.apes.fn.scm.merchant.account.repository;

import com.apes.fn.fico.debitnote.model.BusinessDebitNote;
import com.apes.fn.scm.merchant.account.model.SettlementBusinessDebitItem;
import com.apes.framework.jpa.repository.CustomRepository;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;


/**
 * @BelongsProject: apes-server
 * @BelongsPackage: com.apes.fn.scm.merchant.account.repository
 * @ClassName: SettlementBusinessDebitRepository
 * @Author: pyb
 * @Description:
 * @CreateTime: 2021-10-07 20:37
 * @Version: 1.0
 */
public interface SettlementBusinessDebitRepository extends CustomRepository<SettlementBusinessDebitItem, String> {
    @Query("select T from SettlementBusinessDebitItem S left join S.businessDebitNote  T where S.id=?1")
    Page<BusinessDebitNote> findAllByMerchantSettlementId(String merchantSettlementId, Pageable pageable);
}
